package com.whh.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.whh.entity.BaseEntity;

public interface BaseDao<T extends BaseEntity> {

	Integer add(T entity);

	T getById(Integer id);
	
	Integer del(T entity);

	Integer clear(T entity);
	
	Integer update(T entity);

	List<T> search(T entity);
	
	T searchOfOne(T entity);

	T getByCode(String code);

	List<T> getByIds(List<Integer> ids);

	List<T> sum(T entity);

	List<T> total(T entity);
	
	Integer getIdByText(String text);
	
	List<T> searchByPage(@Param("para") T entity,@Param("currPage") Integer currPage, @Param("pageSize") Integer pageSize);

	Long getRecordsForPage(T entity);

	String getObjTypeById(T entity);
}
